package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:45 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductVersionBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductVersion productVersion;

  protected BeanMap getBeanMap() {

    return new BeanMap(productVersion);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductVersionDAO.Id);

    mappedDaoFields.put(
        "productDefineId", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductDefineId);

    mappedDaoFields.put(
        "productVersion", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductVersion);

    mappedDaoFields.put("remarks", com.ourteam.product.requirement.dao.IProductVersionDAO.Remarks);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductVersionDAO.Status);

    mappedDaoFields.put(
        "versionType", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductVersionType);

    mappedDaoFields.put(
        "parentVersionId", com.ourteam.product.requirement.dao.IProductVersionDAO.ParentVersionId);

    mappedDaoFields.put(
        "productName", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductName);

    mappedDaoFields.put(
        "productCdoe", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductCdoe);

    mappedDaoFields.put(
        "productStatus", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductStatus);

    mappedDaoFields.put(
        "actualEndDate", com.ourteam.product.requirement.dao.IProductVersionDAO.ActualEndDate);

    mappedDaoFields.put(
        "startDate", com.ourteam.product.requirement.dao.IProductVersionDAO.StartDate);

    mappedDaoFields.put("endDate", com.ourteam.product.requirement.dao.IProductVersionDAO.EndDate);

    mappedDaoFields.put(
        "actualStartDate", com.ourteam.product.requirement.dao.IProductVersionDAO.ActualStartDate);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductVersionDAO.SortIndex);

    mappedDaoFields.put(
        "productRemarks", com.ourteam.product.requirement.dao.IProductVersionDAO.ProductRemarks);

    mappedDaoFields.put(
        "parentProductVersion",
        com.ourteam.product.requirement.dao.IProductVersionDAO.ParentProductVersion);

    mappedDaoFields.put(
        "parentProductVersionType",
        com.ourteam.product.requirement.dao.IProductVersionDAO.ParentProductVersionType);

    mappedDaoFields.put(
        "parentProductVersionStatus",
        com.ourteam.product.requirement.dao.IProductVersionDAO.ParentProductVersionStatus);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductVersionBean() {
    super();

    this.productVersion = new com.ourteam.product.requirement.dao.ProductVersion();
  }

  public ProductVersionBean(com.ourteam.product.requirement.dao.ProductVersion productVersion) {
    super();

    this.productVersion = productVersion;
  }

  public com.ourteam.product.requirement.dao.ProductVersion convertToProductVersion() {
    return this.productVersion;
  }

  public com.ourteam.product.requirement.dao.ProductVersion convertTo() {
    return this.productVersion;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productVersion.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productVersion.setId(id);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productVersion.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productVersion.setProductDefineId(productDefineId);
  }

  /**
   * Get productVersion
   *
   * @return String
   */
  public String getProductVersion() {
    return (String) this.productVersion.getProductVersion();
  }

  /**
   * Set productVersion
   *
   * @parameter String
   */
  public void setProductVersion(String productVersion) {

    this.productVersion.setProductVersion(productVersion);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productVersion.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productVersion.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productVersion.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productVersion.setStatus(status);
  }

  /**
   * Get versionType
   *
   * @return String
   */
  public String getVersionType() {
    return (String) this.productVersion.getProductVersionType();
  }

  /**
   * Set versionType
   *
   * @parameter String
   */
  public void setVersionType(String versionType) {

    this.productVersion.setProductVersionType(versionType);
  }

  /**
   * Get parentVersionId
   *
   * @return long
   */
  public long getParentVersionId() {
    return (long) this.productVersion.getParentVersionId();
  }

  /**
   * Set parentVersionId
   *
   * @parameter long
   */
  public void setParentVersionId(long parentVersionId) {

    this.productVersion.setParentVersionId(parentVersionId);
  }

  /**
   * Get productName
   *
   * @return String
   */
  public String getProductName() {

    return (String) this.productVersion.getProductName();
  }

  /**
   * Get productCdoe
   *
   * @return String
   */
  public String getProductCdoe() {

    return (String) this.productVersion.getProductCdoe();
  }

  /**
   * Get productStatus
   *
   * @return String
   */
  public String getProductStatus() {

    return (String) this.productVersion.getProductStatus();
  }

  /**
   * Get actualEndDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualEndDate() {
    return (java.util.Date) this.productVersion.getActualEndDate();
  }

  /**
   * Set actualEndDate
   *
   * @parameter java.util.Date
   */
  public void setActualEndDate(java.util.Date actualEndDate) {

    this.productVersion.setActualEndDate(actualEndDate);
  }

  /**
   * Get startDate
   *
   * @return java.util.Date
   */
  public java.util.Date getStartDate() {
    return (java.util.Date) this.productVersion.getStartDate();
  }

  /**
   * Set startDate
   *
   * @parameter java.util.Date
   */
  public void setStartDate(java.util.Date startDate) {

    this.productVersion.setStartDate(startDate);
  }

  /**
   * Get endDate
   *
   * @return java.util.Date
   */
  public java.util.Date getEndDate() {
    return (java.util.Date) this.productVersion.getEndDate();
  }

  /**
   * Set endDate
   *
   * @parameter java.util.Date
   */
  public void setEndDate(java.util.Date endDate) {

    this.productVersion.setEndDate(endDate);
  }

  /**
   * Get actualStartDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualStartDate() {
    return (java.util.Date) this.productVersion.getActualStartDate();
  }

  /**
   * Set actualStartDate
   *
   * @parameter java.util.Date
   */
  public void setActualStartDate(java.util.Date actualStartDate) {

    this.productVersion.setActualStartDate(actualStartDate);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productVersion.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productVersion.setSortIndex(sortIndex);
  }

  /**
   * Get productRemarks
   *
   * @return String
   */
  public String getProductRemarks() {

    return (String) this.productVersion.getProductRemarks();
  }

  /**
   * Get parentProductVersion
   *
   * @return String
   */
  public String getParentProductVersion() {

    return (String) this.productVersion.getParentProductVersion();
  }

  /**
   * Get parentProductVersionType
   *
   * @return String
   */
  public String getParentProductVersionType() {

    return (String) this.productVersion.getParentProductVersionType();
  }

  /**
   * Get parentProductVersionStatus
   *
   * @return String
   */
  public String getParentProductVersionStatus() {

    return (String) this.productVersion.getParentProductVersionStatus();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductVersionBean) == false) {
      return false;
    } // end if

    ProductVersionBean other = (ProductVersionBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductVersion tempProductVersion =
        other.convertToProductVersion();

    if (tempProductVersion == null || this.productVersion == null) {
      isEqual = false;
    } else if (tempProductVersion == this.productVersion
        || tempProductVersion.equals(this.productVersion)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductVersionBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersion[] aProductVersions) {

    return toArray(aProductVersions, null);
  }

  public static ProductVersionBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersion[] aProductVersions,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductVersions)) {
      return new ProductVersionBean[0];
    }

    int length = aProductVersions.length;

    ProductVersionBean[] beans = new ProductVersionBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductVersionBean(aProductVersions[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductVersions[i]});
      }
    }

    return beans;
  }
}
